#include "CTextPickColor.h"
#include <QGridLayout>

CTextPickColor::CTextPickColor(QWidget *parent) : QWidget(parent)
{
    init();
}

void CTextPickColor::init()
{
    QGridLayout *pLayout = new QGridLayout(this);
    //选中色
    m_frmCurr = new QFrame(this);
    m_frmCurr->setStyleSheet("background:red;");
    pLayout->addWidget(m_frmCurr,0,0,1,4);

    m_pLabelName = new QLabel("RGB",this);
    m_pLineEdit = new QLineEdit(this);
    pLayout->addWidget(m_pLabelName,1,0,1,1);
    pLayout->addWidget(m_pLineEdit,1,1,1,3);

    m_pLabelMode = new QLabel("RGB",this);
    m_pSpinBox1 = new QSpinBox(this);
    m_pSpinBox2 = new QSpinBox(this);
    m_pSpinBox3 = new QSpinBox(this);
    pLayout->addWidget(m_pLabelMode,2,0,1,1);
    pLayout->addWidget(m_pSpinBox1,2,1,1,1);
    pLayout->addWidget(m_pSpinBox2,2,2,1,1);
    pLayout->addWidget(m_pSpinBox3,2,3,1,1);

    m_pRadBtnModeRGB = new QRadioButton("RGB",this);
    m_pLabelRGB = new QLabel("rgb(0,0,0)",this);
    pLayout->addWidget(m_pRadBtnModeRGB,3,0,1,1);
    pLayout->addWidget(m_pLabelRGB,3,1,1,3);

    m_pRadBtnModeHSL = new QRadioButton("HSL",this);
    m_pLabelHSL = new QLabel("hsl(0,0,0)",this);
    pLayout->addWidget(m_pRadBtnModeHSL,4,0,1,1);
    pLayout->addWidget(m_pLabelHSL,4,1,1,3);

    m_pRadBtnModeHSV = new QRadioButton("HSV",this);
    m_pLabelHSV = new QLabel("hlv(0,0,0)",this);
    pLayout->addWidget(m_pRadBtnModeHSV,5,0,1,1);
    pLayout->addWidget(m_pLabelHSV,5,1,1,3);

}
